package org.dromara.patrol.domain.model.snap;

import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;

import java.io.Serial;
import java.io.Serializable;

@Data
public class SnapTime implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    /**
     * 开始时间 08:30
     */
    @Pattern(regexp="([01]?[0-9]|2[0-3]):[0-5][0-9]", message="时间格式必须为HH:mm", groups = { AddGroup.class, EditGroup.class })
    private String startTime;
    /**
     * 结束时间 09:00
     */
    @Pattern(regexp="([01]?[0-9]|2[0-3]):[0-5][0-9]", message="时间格式必须为HH:mm", groups = { AddGroup.class, EditGroup.class })
    private String endTime;
    /**
     * 间隔秒 600
     */
    @NotNull(message = "间隔秒不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long interval;
}
